let mongoose=require('../db/lian')

let Schema = mongoose.Schema


//电话号
const userlistSchema = new Schema({
        username:String,
        password:String,

    })
const userlistModel = mongoose.model('userlistSchema',userlistSchema,'userlistSchema')


//角色信息
let xinSchema=mongoose.Schema({
    usertu:String,
    usename:String,
    usepid:{
        type:mongoose.Types.ObjectId,
        ref:'userlistSchema'
    }
})
let xinModel=mongoose.model('xinSchema',xinSchema,'xinSchema')


// userlistModel.create({
//     username:13131048367,
//     password:111111
// })


// xinModel.create({
//     usertu:'https://ts1.cn.mm.bing.net/th?id=OIP-C.6ZyK9nSZH54IassCkWHzIgAAAA&w=250&h=250&c=8&rs=1&qlt=90&o=6&pid=3.1&rm=2',
//     usename:'王慧斌',
//     usepid:'65edb3997594495b27c7adec'
// })




module.exports={
    xinModel,
    userlistModel
}